<?php

use System\Core\Router;
use App\Controllers\AdminController;
use App\controllers\DashController;
use App\Controllers\HomeController;
use App\controllers\SysController;
use App\controllers\UploadController;

$router = new Router();

// 定义路由
$router->post('upload/image', [UploadController::class, 'image']);

$router->get('', [HomeController::class, 'index']);
$router->get('home', [HomeController::class, 'index']);
$router->get('about', [HomeController::class, 'about']);

$router->get('admin', [AdminController::class, 'index']);
$router->rule('admin/login', [AdminController::class, 'login']);
$router->rule('admin/register', [AdminController::class, 'register']);
$router->rule('admin/logout', [AdminController::class, 'logout']);

$router->get('admin/dash', [DashController::class, 'index']);

$router->rule('admin/sys', [SysController::class, 'index']);
$router->rule('admin/sys/add', [SysController::class, 'add']);
$router->rule('admin/sys/edit', [SysController::class, 'edit']);
$router->get('admin/sys/del/{id}', [SysController::class, 'del']);

// 添加更多路由...